{% extends 'base/base.html' %}

{% block title %}
    <title>新增商品</title>
{% endblock %}

{% block content %}
    <div class="tab-pane fade show active" id="productAdd" role="tabpanel" aria-labelledby="v-pills-home-tab">
        <h1>新增商品</h1>
        <form action="{{ url_for('mall.product_add') }}" method="post" enctype="multipart/form-data">
            <div class="form-group">
                {{ form.name.label }}
                {{ form.name }}
                <p>{{ form.name.description }}</p>
            </div>
            <div class="form-group">
                {{ form.content.label }}
                {{ form.content }}
            </div>
            <div class="form-group">
                {{ form.desc.label }}
                {{ form.desc }}
            </div>
            <div class="form-group">
                {{ form.types.label }}
                {{ form.types }}
            </div>
            <div class="form-group">
                {{ form.price.label }}
                {{ form.price }}
            </div>
            <div class="form-group">
                {{ form.origin_price.label }}
                {{ form.origin_price }}
            </div>
            <div class="form-group">
                {{ form.img.label }}
                {{ form.img }}
            </div>
            <div class="form-group">
                {{ form.channel.label }}
                {{ form.channel }}
            </div>
            <div class="form-group">
                {{ form.buy_link.label }}
                {{ form.buy_link }}
            </div>
            <div class="form-group">
                {{ form.status.label }}
                {{ form.status }}
            </div>
            <div class="form-group">
                {{ form.sku_count.label }}
                {{ form.sku_count }}
            </div>
            <div class="form-group">
                {{ form.remain_count.label }}
                {{ form.remain_count }}
            </div>
            <div class="form-group">
                {{ form.view_count.label }}
                {{ form.view_count }}
            </div>
            <div class="form-group">
                {{ form.score.label }}
                {{ form.score }}
            </div>
            <div class="form-group mt-2 mb-2">
                <div>
                    {{ form.is_valid }}{{ form.is_valid.label.text }}
                </div>
            </div>
            <div class="form-group">
                {{ form.reoder.label }}
                {{ form.reoder }}
            </div>

            <div class="mt-3 mb-3">
                <button class="btn btn-primary" type="submit">提交</button>
            </div>

            {{ form.csrf_token }}
        </form>
    </div>
{% endblock %}